import request from '@/utils/request'

//列表数据
export function gettrainList(data){
    return request({
        url: 'train',
        method: 'get',
        params:data
      })
}

//新增数据
export function createData(data){
    return request({
        url: 'train/create',
        method: 'post',
        data
      })
}

//获取详情
export function readData(data){
    return request({
        url: 'train/read',
        method: 'get',
        params:data,
        headers:{
          'showLoading':false
        }
      })
}

//修改
export function editData(data){
    return request({
        url: 'train/update',
        method: 'put',
        data:data
      })
}
// 修改线上展示状态
export function updateState(data){
    return request({
        url: 'train/updatestate',
        method: 'put',
        params:data
      })
}

//删除
export function deleteData(data){
    return request({
        url: 'train/delete',
        method: 'delete',
        data:data
      })
}

//训练场选择
export function trainOption(){
  return request({
    url: 'train/option',
    method: 'get'
  })
}
